package com.dyz.leetcode._19_greedy;

import java.util.Arrays;

public class _455_findContentChildren {
    public int findContentChildren(int[] g, int[] s) {
        Arrays.sort(g);
        Arrays.sort(s);
        int i=0;
        int j=0;
        while (i<g.length && j<s.length){
            if(s[j]>=s[i]){i++;}
            j++;
        }
        return i;
    }
}
